package com.intretech.umsin.system.api;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.intretech.umsin.common.web.ApiResult;
import com.intretech.umsin.system.param.SysDeptParam;
import com.intretech.umsin.system.vo.SysDeptVo;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @version V1.0
* 部门/组织/机构管理: sys_dept 为其他服务提供内部调用接口 API.
* @InterfaceName: SysDeptApi
* @Description: 部门/组织/机构管理:sys_dept 为其他服务提供内部调用接口 API.
* @author: 李启联
* @date:   2022-8-16 16:44:06
* @Copyright: Copyright (c) 2022
*/

public interface SysDeptApi {

    @GetMapping("/system/sysdept/get/{id}")
    public ApiResult<SysDeptVo> querySysDeptById(@PathVariable("id") String id);

    @PostMapping("/system/sysdept/listByIds")
    public ApiResult<List<SysDeptVo>> querySysDeptByIds(@RequestBody List<String> ids);

    @PostMapping("/system/sysdept/page/{pageNo}/{pageSize}")
    public ApiResult<IPage<SysDeptVo>> querySysDeptForPage(@RequestBody SysDeptParam params, @PathVariable("pageNo") Integer pageNo, @PathVariable("pageSize") Integer pageSize);

    @PostMapping("/system/sysdept/list")
    public ApiResult<List<SysDeptVo>> querySysDeptForList(@RequestBody SysDeptParam params);

    @PostMapping("/system/sysdept/add")
    public ApiResult<SysDeptVo> addSysDept(@RequestBody SysDeptVo vo);

    @PostMapping("/system/sysdept/adds")
    public ApiResult<List<SysDeptVo>> addsSysDept(@RequestBody List<SysDeptVo> voList);

    @PutMapping("/system/sysdept/modify")
    public ApiResult<SysDeptVo> modifySysDept(@RequestBody SysDeptVo vo);

    @PutMapping("/system/sysdept/modifys")
    public ApiResult<List<SysDeptVo>> modifysSysDept(@RequestBody List<SysDeptVo> voList);

    @DeleteMapping("/system/sysdept/remove/{id}")
    public ApiResult<Void> removeSysDept(@PathVariable("id") String id);

    @DeleteMapping("/system/sysdept/removes")
    public ApiResult<Void> removesSysDept(@RequestBody List<String> ids);

}